phone no validate

38

# Enter your code here. Read input from STDIN. Print output to STDOUT
import re
for _ in range(int(input())):
    if re.match(r'[789]\d{9}$',input()):   
        print('YES')  
    else:  
        print('NO')

Comments

Submit
0 Comments